﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace _20EFCore乐观并发控制;

public class HouseConfig:IEntityTypeConfiguration<House>
{
    public DbSet<House> Houses { get; set; }
    public void Configure(EntityTypeBuilder<House> builder)
    {
        builder.ToTable("T_Houses");
        //builder.Property(h => h.Owner).IsConcurrencyToken();
        builder.Property(h => h.RowVersion).IsRowVersion();
    }
} 